/**
 * Copyright (C) 2025  粤港澳大湾区（广东）国创中心
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, see <https://www.gnu.org/licenses/>.
 */
#ifndef NctiGmshPubFun_H
#define NctiGmshPubFun_H

#include <ncti_base.h>
#include "map"
#include "vector"
#include <NctiMeshDataDef.h>

namespace NCTI
{
	class NctiOCCBody;
	class NctiMeshBody;
	class NctiDisplayDocCustomContainer;
	class NctiGmeshHelper {
	public:
		NctiGmeshHelper(Ncti_Mesh_Option);
		~NctiGmeshHelper();

		bool ImportModelOCC(NctiDisplayDocCustomContainer*, NctiOCCBody*);

		bool CalculaeSurface();

		bool CalculateVolume();

        bool CopyResult(std::vector<Ncti_Float>& pos,
            std::vector<NctiElementType>& elemType,
            std::vector<Ncti_UInteger>& elemTag,
            std::vector<Ncti_UInteger>& elemData);

	private:
		std::map<std::pair<int, int>, int> m_parts;
		Ncti_Mesh_Option m_op;
	};
}
#endif
